home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12863 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: news.tu-chemnitz.de!news
  2. From: hfst@hrz.tu-chemnitz.de (Hans Steffani)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Can anyone HELP with variable delaration? Please?
  5. Date: 3 Apr 96 06:27:34 GMT
  6. Organization: University of Technology Chemnitz, FRG
  7. Message-ID: <4jt5r4$icg@narses.hrz.tu-chemnitz.de>
  8. References: <4jt07b$dul@news.us.net>
  9. NNTP-Posting-Host: sisyphus.hrz.tu-chemnitz.de
  10.  
  11. sillybug@us.net (brian skrab) writes:
  12.  
  13. >Hello,
  14.  
  15. >I've just started learning C programming (moving up from Pascal) and I can't 
  16. >seem to find an answer to this question.  I'm sure this is going to sound 
  17. >stupid, but how can I declare a variable to be of a data type string?  Is 
  18. >there a data type "string"?
  19.  
  20. There is no data type string. Take an array of chars which can
  21. be used as string as long as the last (valid) character is \0
  22. which means that the length of the array is one more as you need.
  23.  
  24. h.f.s.
  25. --
  26. Hans Friedrich Steffani
  27. Institut fuer Elektrische Maschinen und Antriebe
  28. TU Chemnitz-Zwickau
  29. e-mail: hans.steffani@e-technik.tu-chemnitz.de
  30.